home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-01-12 | 2.2 KB | 54 lines | [TEXT/ToyS] |
- dd install with fonts [null, null, null, null, {name:"Geneva", size:10}] with grayscale
- if Alert(0, "Check this computer for available kibbles?", ¬
- "Checking for kibbles is an demonstration task that will take" & ¬
- " a few seconds but may be stopped safely at anytime.", "OK", "Cancel") then
-
- set progress to dd make dialog {size:[320, 92], default item:2, contents:[¬
- {class:push button, bounds:[242, 63, 310, 83], name:"Stop -."}, ¬
- {class:static text, bounds:[10, 9, 352, 9 + 16], contents:"Looking for kibble boxes:"}, ¬
- {class:gauge, bounds:[10, 35, 310, 35 + 12], max value:-1} ¬
- ], style:movable dialog, name:"Kibbles"}
- set aborted to false
- repeat with i from 1 to 50
- if (dd interact with user for max ticks 0) = 1 then
- set aborted to true
- exit repeat
- end if
- dd set value of item 3 of progress to i
- end repeat
- if not aborted then
- dd set contents of item 2 of progress to "Checking found boxes for kibbles:"
- dd set value of item 3 of progress to 0
- dd set max value of item 3 of progress to 200
- repeat with i from 1 to 200
- if (dd interact with user for max ticks 0) = 1 then
- set aborted to true
- exit repeat
- end if
- dd set value of item 3 of progress to i
- end repeat
- end if
- dd delete progress
- if aborted then
- Alert(2, "You have stopped the kibble check!", ¬
- "Go straight to bed with nothing to eat!", "Oh No!", "")
- else
- Alert(1, "There are no more available kibbles on your computer.", ¬
- "To increase the number of kibbles, find the nearest dog and take" & ¬
- " the necessary number form his food bowl.", "OK", "")
- end if
- end if
- dd uninstall
-
- -- From ‘Alert.as’
- on Alert(icn, msg1, msg2, btn1, btn2)
- set c to [{class:push button, bounds:[295, 83, 353, 103], name:btn1}]
- if btn2 ≠ "" then set c to c & [{class:push button, bounds:[225, 83, 283, 103], name:btn2}]
- set dlog to {size:[362, 112], style:movable dialog, contents:c & [¬
- {class:icon, bounds:[17, 9, 17 + 32, 9 + 32], contents:icn}, ¬
- {class:static text, bounds:[67, 9, 352, 9 + 32], contents:msg1}, ¬
- {class:static text, bounds:[67, 45, 352, 45 + 26], contents:msg2, font:5} ¬
- ]}
-
- (dd auto dialog dlog with fonts [null, null, null, null, {name:"Geneva", size:10}] with grayscale)'s item 1
- end Alert